Intro

This just shows a brief example of how you can start a game and trigger turns to progress.

library(MundusCentrum)

Setup the game

game <- new_game(
  name = "Anno Uno",
  players = list(
    list(
      name = "Big Grizz",
      team = "Space Marines",
      units = system.file("extdata", "unit-templates", "big_grizz.csv", package = "MundusCentrum")
    ),
    list(
      name = "Eric",
      team = "Space Orcs",
      units = system.file("extdata", "unit-templates", "eric.csv", package = "MundusCentrum")
    ),
    list(
      name = "Chris",
      team = "Tyrannids",
      units = system.file("extdata", "unit-templates", "chris.csv", package = "MundusCentrum")
    )
  ),
  points = 2000
)
## All units resolved.

see the starting point

This is the state of the game at the beginning

res <- reconcile_player_orders(game)
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
big_grizz A1 hold Angelina Diaz lt_dan troop
big_grizz A1 hold Caden Hicks lt_dan troop
big_grizz A1 hold Leilani Jones lt_dan troop
big_grizz A1 hold Logan Vasquez lt_dan troop
big_grizz A1 hold Reagan Neal lt_dan troop
big_grizz A2 hold Snakeface Contender steve_zissou elite
big_grizz A2 hold Ian Wolf cptn_steve_hiller_usmc troop
big_grizz A3 hold Fearless Commander keyser_soze elite
big_grizz A4 hold Lana Del Rey maverick flyer
big_grizz A5 hold Tony Bennett maverick flyer
big_grizz A6 hold Dan Brown Camacho mule transport
big_grizz A6 hold Aaliyah Valdez cptn_steve_hiller_usmc troop
big_grizz A6 hold Elizabeth Dawson lt_dan troop
big_grizz A6 hold Emmanuel Mitchell lt_dan troop
big_grizz A6 hold Mila Lopez lt_dan troop
eric C1 hold V S Naipaul rambo heavy
eric C1 hold Stan Lee Carr mule transport
eric C1 hold William S Maugham Ford mule transport
eric C1 hold Caroline Gibson lt_dan troop
eric C1 hold King Burgess lt_dan troop
eric C1 hold Vanessa Hughes lt_dan troop
eric C2 hold Andy Serkis ricky_bobby fast
eric C2 hold David Niven ricky_bobby fast
eric C3 hold Karl Barth charlie_kaufman heavy
eric C4 hold Midnight God steve_zissou elite
eric C4 hold Childish Gambino maverick flyer
eric C5 hold Dogface Pupil rocketman elite
eric C5 hold Sarkastik Bandit rocketman elite
chris F1 hold Jawaharlal Nehru Chavez mule transport
chris F1 hold Jeffery Archer May mule transport
chris F1 hold Schilling Taub Nunez mule transport
chris F1 hold Aurora Pacheco lt_dan troop
chris F1 hold Emily Holland lt_dan troop
chris F1 hold Harmony Lyons lt_dan troop
chris F1 hold Laila Henderson lt_dan troop
chris F1 hold Sadie Ochoa lt_dan troop
chris F1 hold Victoria Chan lt_dan troop
chris F2 hold Jeremy Bentham charlie_kaufman heavy
chris F2 hold Amitav Ghosh Snyder mule transport
chris F2 hold James Stewart Romero mule transport
chris F2 hold Anthony Gill lt_dan troop
chris F2 hold Ezra Marshall lt_dan troop
chris F2 hold Nicolas Newman lt_dan troop
chris F2 hold Paige Campbell lt_dan troop
chris F2 hold Silas Lara lt_dan troop
chris F2 hold Xavier Stevens lt_dan troop
chris F3 hold Foolish Dreamer steve_zissou elite
chris F6 hold Olivia Newton-John maverick flyer

Turn play

Get a list of unit ID’s to easily make the move_unit() calls below.

moby_units <- read_player_map(game, "big_grizz") %>% pull(unit_name)
eric_units <- read_player_map(game, "eric") %>% pull(unit_name)
chris_units <- read_player_map(game, "chris") %>% pull(unit_name)

TURN 1

Players change their maps (making orders)

move_unit(game, "big_grizz", moby_units[1:5],   "move", "A1", "E2")
move_unit(game, "eric",      eric_units[1:6],   "move", "C1", "F7")
move_unit(game, "chris",     chris_units[10:18],"move", "F2", "F3")
move_unit(game, "chris",     chris_units[19],   "sneak","F3", "E5")
move_unit(game, "chris",     chris_units[20],   "soar","F6", "D4")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
big_grizz A2 hold Snakeface Contender steve_zissou elite
big_grizz A2 hold Ian Wolf cptn_steve_hiller_usmc troop
big_grizz A3 hold Fearless Commander keyser_soze elite
big_grizz A4 hold Lana Del Rey maverick flyer
big_grizz A5 hold Tony Bennett maverick flyer
big_grizz A6 hold Dan Brown Camacho mule transport
big_grizz A6 hold Aaliyah Valdez cptn_steve_hiller_usmc troop
big_grizz A6 hold Elizabeth Dawson lt_dan troop
big_grizz A6 hold Emmanuel Mitchell lt_dan troop
big_grizz A6 hold Mila Lopez lt_dan troop
eric C2 hold Andy Serkis ricky_bobby fast
eric C2 hold David Niven ricky_bobby fast
eric C3 hold Karl Barth charlie_kaufman heavy
eric C4 hold Midnight God steve_zissou elite
eric C4 hold Childish Gambino maverick flyer
eric C5 hold Dogface Pupil rocketman elite
eric C5 hold Sarkastik Bandit rocketman elite
chris D4 soar Olivia Newton-John maverick flyer
big_grizz E2 move Angelina Diaz lt_dan troop
big_grizz E2 move Caden Hicks lt_dan troop
big_grizz E2 move Leilani Jones lt_dan troop
big_grizz E2 move Logan Vasquez lt_dan troop
big_grizz E2 move Reagan Neal lt_dan troop
chris E5 sneak Foolish Dreamer steve_zissou elite
chris F1 hold Jawaharlal Nehru Chavez mule transport
chris F1 hold Jeffery Archer May mule transport
chris F1 hold Schilling Taub Nunez mule transport
chris F1 hold Aurora Pacheco lt_dan troop
chris F1 hold Emily Holland lt_dan troop
chris F1 hold Harmony Lyons lt_dan troop
chris F1 hold Laila Henderson lt_dan troop
chris F1 hold Sadie Ochoa lt_dan troop
chris F1 hold Victoria Chan lt_dan troop
chris F3 move Jeremy Bentham charlie_kaufman heavy
chris F3 move Amitav Ghosh Snyder mule transport
chris F3 move James Stewart Romero mule transport
chris F3 move Anthony Gill lt_dan troop
chris F3 move Ezra Marshall lt_dan troop
chris F3 move Nicolas Newman lt_dan troop
chris F3 move Paige Campbell lt_dan troop
chris F3 move Silas Lara lt_dan troop
chris F3 move Xavier Stevens lt_dan troop
eric F7 move V S Naipaul rambo heavy
eric F7 move Stan Lee Carr mule transport
eric F7 move William S Maugham Ford mule transport
eric F7 move Caroline Gibson lt_dan troop
eric F7 move King Burgess lt_dan troop
eric F7 move Vanessa Hughes lt_dan troop

We’re good! Move on to the next turn. (Note: Moby managed to teleport from A1 to E2 aka The Gates of Moria on his first turn.)

TURN 2

Players change their maps (making orders)

move_unit(game, "big_grizz", moby_units[1:5],   "move", "E2", "F1")
move_unit(game, "eric",      eric_units[1:6],   "move", "F7", "F4")
move_unit(game, "chris",     chris_units[10:18],"move", "F3", "F4")
move_unit(game, "chris",     chris_units[19],   "sneak","E5", "E7")
move_unit(game, "chris",     chris_units[20],   "soar", "D4", "B1")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## CONFLICT(s):
## Warning: Conflict is at hand! Please resolve territorial disputes.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
big_grizz F1 move Angelina Diaz lt_dan troop
big_grizz F1 move Caden Hicks lt_dan troop
big_grizz F1 move Leilani Jones lt_dan troop
big_grizz F1 move Logan Vasquez lt_dan troop
big_grizz F1 move Reagan Neal lt_dan troop
chris F1 hold Jawaharlal Nehru Chavez mule transport
chris F1 hold Jeffery Archer May mule transport
chris F1 hold Schilling Taub Nunez mule transport
chris F1 hold Aurora Pacheco lt_dan troop
chris F1 hold Emily Holland lt_dan troop
chris F1 hold Harmony Lyons lt_dan troop
chris F1 hold Laila Henderson lt_dan troop
chris F1 hold Sadie Ochoa lt_dan troop
chris F1 hold Victoria Chan lt_dan troop
chris F4 move Jeremy Bentham charlie_kaufman heavy
chris F4 move Amitav Ghosh Snyder mule transport
chris F4 move James Stewart Romero mule transport
chris F4 move Anthony Gill lt_dan troop
chris F4 move Ezra Marshall lt_dan troop
chris F4 move Nicolas Newman lt_dan troop
chris F4 move Paige Campbell lt_dan troop
chris F4 move Silas Lara lt_dan troop
chris F4 move Xavier Stevens lt_dan troop
eric F4 move V S Naipaul rambo heavy
eric F4 move Stan Lee Carr mule transport
eric F4 move William S Maugham Ford mule transport
eric F4 move Caroline Gibson lt_dan troop
eric F4 move King Burgess lt_dan troop
eric F4 move Vanessa Hughes lt_dan troop

Fights are resolved

This is where the players would resolved fights however they see fit (e.g. Warhammer, chessboxing, what-have-you)

Then they adjust their maps accordingly for the outcome of the conflicts.

move_unit(game, "eric",      eric_units[1:6],   "retreat", "F4", "F7")
move_unit(game, "chris",     chris_units[1:9],  "retreat", "F1", "F2")

Now we reconcile again.

res <- reconcile_player_orders(game)
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
big_grizz A2 hold Snakeface Contender steve_zissou elite
big_grizz A2 hold Ian Wolf cptn_steve_hiller_usmc troop
big_grizz A3 hold Fearless Commander keyser_soze elite
big_grizz A4 hold Lana Del Rey maverick flyer
big_grizz A5 hold Tony Bennett maverick flyer
big_grizz A6 hold Dan Brown Camacho mule transport
big_grizz A6 hold Aaliyah Valdez cptn_steve_hiller_usmc troop
big_grizz A6 hold Elizabeth Dawson lt_dan troop
big_grizz A6 hold Emmanuel Mitchell lt_dan troop
big_grizz A6 hold Mila Lopez lt_dan troop
chris B1 soar Olivia Newton-John maverick flyer
eric C2 hold Andy Serkis ricky_bobby fast
eric C2 hold David Niven ricky_bobby fast
eric C3 hold Karl Barth charlie_kaufman heavy
eric C4 hold Midnight God steve_zissou elite
eric C4 hold Childish Gambino maverick flyer
eric C5 hold Dogface Pupil rocketman elite
eric C5 hold Sarkastik Bandit rocketman elite
chris E7 sneak Foolish Dreamer steve_zissou elite
big_grizz F1 move Angelina Diaz lt_dan troop
big_grizz F1 move Caden Hicks lt_dan troop
big_grizz F1 move Leilani Jones lt_dan troop
big_grizz F1 move Logan Vasquez lt_dan troop
big_grizz F1 move Reagan Neal lt_dan troop
chris F2 retreat Jawaharlal Nehru Chavez mule transport
chris F2 retreat Jeffery Archer May mule transport
chris F2 retreat Schilling Taub Nunez mule transport
chris F2 retreat Aurora Pacheco lt_dan troop
chris F2 retreat Emily Holland lt_dan troop
chris F2 retreat Harmony Lyons lt_dan troop
chris F2 retreat Laila Henderson lt_dan troop
chris F2 retreat Sadie Ochoa lt_dan troop
chris F2 retreat Victoria Chan lt_dan troop
chris F4 move Jeremy Bentham charlie_kaufman heavy
chris F4 move Amitav Ghosh Snyder mule transport
chris F4 move James Stewart Romero mule transport
chris F4 move Anthony Gill lt_dan troop
chris F4 move Ezra Marshall lt_dan troop
chris F4 move Nicolas Newman lt_dan troop
chris F4 move Paige Campbell lt_dan troop
chris F4 move Silas Lara lt_dan troop
chris F4 move Xavier Stevens lt_dan troop
eric F7 retreat V S Naipaul rambo heavy
eric F7 retreat Stan Lee Carr mule transport
eric F7 retreat William S Maugham Ford mule transport
eric F7 retreat Caroline Gibson lt_dan troop
eric F7 retreat King Burgess lt_dan troop
eric F7 retreat Vanessa Hughes lt_dan troop

We’re good. On to turn 3.

TURN 3

Players change their maps (making orders)

move_unit(game, "big_grizz", moby_units[1:5], "defend", "F1", "F1")
move_unit(game, "big_grizz", moby_units[6:7],   "move", "A2", "A3")
move_unit(game, "big_grizz", moby_units[11:15], "move", "A5", "A7")
move_unit(game, "big_grizz", moby_units[11:15], "move", "A6", "A5")
move_unit(game, "eric",      eric_units[1:6], "defend", "F7", "F7")
move_unit(game, "eric",      eric_units[7:8],   "move", "C2", "C5")
move_unit(game, "eric",      eric_units[11:12], "move", "C5", "D2")
move_unit(game, "chris",     chris_units[10:17],"move", "F4", "F2")
move_unit(game, "chris",     chris_units[18],   "move", "F4", "E5")
move_unit(game, "chris",     chris_units[20],   "soar", "B1", "B6")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
big_grizz A3 hold Fearless Commander keyser_soze elite
big_grizz A3 move Snakeface Contender steve_zissou elite
big_grizz A3 move Ian Wolf cptn_steve_hiller_usmc troop
big_grizz A4 hold Lana Del Rey maverick flyer
big_grizz A5 hold Tony Bennett maverick flyer
big_grizz A5 move Dan Brown Camacho mule transport
big_grizz A5 move Aaliyah Valdez cptn_steve_hiller_usmc troop
big_grizz A5 move Elizabeth Dawson lt_dan troop
big_grizz A5 move Emmanuel Mitchell lt_dan troop
big_grizz A5 move Mila Lopez lt_dan troop
chris B6 soar Olivia Newton-John maverick flyer
eric C3 hold Karl Barth charlie_kaufman heavy
eric C4 hold Midnight God steve_zissou elite
eric C5 hold Dogface Pupil rocketman elite
eric C5 move Andy Serkis ricky_bobby fast
eric C5 move David Niven ricky_bobby fast
eric D2 move Sarkastik Bandit rocketman elite
eric D2 move Childish Gambino maverick flyer
chris E5 move Jeremy Bentham charlie_kaufman heavy
chris E7 sneak Foolish Dreamer steve_zissou elite
big_grizz F1 defend Angelina Diaz lt_dan troop
big_grizz F1 defend Caden Hicks lt_dan troop
big_grizz F1 defend Leilani Jones lt_dan troop
big_grizz F1 defend Logan Vasquez lt_dan troop
big_grizz F1 defend Reagan Neal lt_dan troop
chris F2 move Amitav Ghosh Snyder mule transport
chris F2 move James Stewart Romero mule transport
chris F2 move Anthony Gill lt_dan troop
chris F2 move Ezra Marshall lt_dan troop
chris F2 move Nicolas Newman lt_dan troop
chris F2 move Paige Campbell lt_dan troop
chris F2 move Silas Lara lt_dan troop
chris F2 move Xavier Stevens lt_dan troop
chris F2 retreat Jawaharlal Nehru Chavez mule transport
chris F2 retreat Jeffery Archer May mule transport
chris F2 retreat Schilling Taub Nunez mule transport
chris F2 retreat Aurora Pacheco lt_dan troop
chris F2 retreat Emily Holland lt_dan troop
chris F2 retreat Harmony Lyons lt_dan troop
chris F2 retreat Laila Henderson lt_dan troop
chris F2 retreat Sadie Ochoa lt_dan troop
chris F2 retreat Victoria Chan lt_dan troop
eric F7 defend V S Naipaul rambo heavy
eric F7 defend Stan Lee Carr mule transport
eric F7 defend William S Maugham Ford mule transport
eric F7 defend Caroline Gibson lt_dan troop
eric F7 defend King Burgess lt_dan troop
eric F7 defend Vanessa Hughes lt_dan troop

Vision

No conflict here, but notice how everyone’s vision changes… [WORK IN PROGRESS]

TURN 4

Players change their maps (making orders). Renew the attack.

move_unit(game, "big_grizz", moby_units[6:7],   "move", "A2", "B1")
move_unit(game, "big_grizz", moby_units[11:15], "move", "A6", "B5")
move_unit(game, "eric",      eric_units[7:8],   "move", "F5", "F3")
move_unit(game, "eric",      eric_units[11:12], "move", "E2", "E3")
move_unit(game, "chris",     chris_units[1:17],"attack","F2", "F1")
move_unit(game, "chris",     chris_units[18], "attack", "E5", "F7")
move_unit(game, "chris",     chris_units[19],   "sneak","E7", "F8")
move_unit(game, "chris",     chris_units[20],   "soar", "B6", "C3")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## CONFLICT(s):
## Warning: Conflict is at hand! Please resolve territorial disputes.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
chris C3 soar Olivia Newton-John maverick flyer
eric C3 hold Karl Barth charlie_kaufman heavy
big_grizz F1 defend Angelina Diaz lt_dan troop
big_grizz F1 defend Caden Hicks lt_dan troop
big_grizz F1 defend Leilani Jones lt_dan troop
big_grizz F1 defend Logan Vasquez lt_dan troop
big_grizz F1 defend Reagan Neal lt_dan troop
chris F1 attack Amitav Ghosh Snyder mule transport
chris F1 attack James Stewart Romero mule transport
chris F1 attack Jawaharlal Nehru Chavez mule transport
chris F1 attack Jeffery Archer May mule transport
chris F1 attack Schilling Taub Nunez mule transport
chris F1 attack Anthony Gill lt_dan troop
chris F1 attack Aurora Pacheco lt_dan troop
chris F1 attack Emily Holland lt_dan troop
chris F1 attack Ezra Marshall lt_dan troop
chris F1 attack Harmony Lyons lt_dan troop
chris F1 attack Laila Henderson lt_dan troop
chris F1 attack Nicolas Newman lt_dan troop
chris F1 attack Paige Campbell lt_dan troop
chris F1 attack Sadie Ochoa lt_dan troop
chris F1 attack Silas Lara lt_dan troop
chris F1 attack Victoria Chan lt_dan troop
chris F1 attack Xavier Stevens lt_dan troop
chris F7 attack Jeremy Bentham charlie_kaufman heavy
eric F7 defend V S Naipaul rambo heavy
eric F7 defend Stan Lee Carr mule transport
eric F7 defend William S Maugham Ford mule transport
eric F7 defend Caroline Gibson lt_dan troop
eric F7 defend King Burgess lt_dan troop
eric F7 defend Vanessa Hughes lt_dan troop

Fights are resolved

We fight. Adjust maps accordingly for the outcome of the conflicts.

move_unit(game, "big_grizz", moby_units[1:6], "retreat", "F1", "E2")
move_unit(game, "eric",      eric_units[1:6], "retreat", "F7", "F8")
move_unit(game, "chris",     chris_units[20], "retreat", "C3", "C5")

Now we reconcile again.

res <- reconcile_player_orders(game)
## CONFLICT(s):
## Warning: Conflict is at hand! Please resolve territorial disputes.
print(draw_map(res))

knitr::kable(res)
player loc action unit_name unit_type force_org
chris C5 retreat Olivia Newton-John maverick flyer
eric C5 hold Dogface Pupil rocketman elite
chris F8 sneak Foolish Dreamer steve_zissou elite
eric F8 retreat V S Naipaul rambo heavy
eric F8 retreat Stan Lee Carr mule transport
eric F8 retreat William S Maugham Ford mule transport
eric F8 retreat Caroline Gibson lt_dan troop
eric F8 retreat King Burgess lt_dan troop
eric F8 retreat Vanessa Hughes lt_dan troop

Retreats

Here’s a good question: what happens here? A large army retreats into an area where a spy has been hiding. Do they fight? Do they take casualties?

TURN 5

Players change their maps (making orders)…